﻿using Google.OrTools.ConstraintSolver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Study.GoogleOptimizationTools.ConsoleApp.Extensions
{
    public static class WrappedConstraintExtentions
    {

        static public WrappedConstraint Or(this WrappedConstraint constraint, WrappedConstraint other)
        {
            return constraint.solver().MakeMax(constraint, other) == 1;
        }

        static public WrappedConstraint And(this WrappedConstraint constraint, WrappedConstraint other)
        {
            return constraint.solver().MakeSum(constraint, other) == 2;
        }
    }
}
